package com.imooc.miaosha.config;

import com.imooc.miaosha.domain.MiaoshaUser;

/**
 * @author Paul
 * @version 0.1
 * @date 2018/3/29 0029
 */
public class MiaoshaUserContext {
    public static ThreadLocal<MiaoshaUser> userHolder = new ThreadLocal<>();

    public static void setUser(MiaoshaUser user) {
        userHolder.set(user);
    }

    public static MiaoshaUser getUser() {
        return userHolder.get();
    }
}
